//
//  SideContentTableViewCell.m
//  恒记
//
//  Created by rimi on 16/5/13.
//  Copyright © 2016年 can. All rights reserved.
//

#import "SideContentTableViewCell.h"

@implementation SideContentTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.mainImage];
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}


#pragma mark *** Getters ***
-(UIImageView *)mainImage{
    if (_mainImage == nil) {
        _mainImage = [[UIImageView alloc] initWithFrame:CGRectMake(20 * PROPORTION_W, 20 *PROPORTION_H, 40 *PROPORTION_W, 40 *PROPORTION_W)];
//        _mainImage.backgroundColor = [UIColor redColor];
    }
    return _mainImage;
}

-(UILabel *)titleLabel{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150 * PROPORTION_W, 30 * PROPORTION_H)];
        _titleLabel.center = CGPointMake(CGRectGetMaxX(_mainImage.frame) + CGRectGetMidX(_titleLabel.bounds) + 10 * PROPORTION_W, _mainImage.center.y);
//        _titleLabel.backgroundColor = [UIColor redColor];
    }
    
    return _titleLabel;
}



@end
